<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>


    <script>
        //不重复
        var set = new Set(['one', 'tow', 'three'])

        for (let i of set) {
            console.log(i)
        }


        //set转换为数组
        var set = new Set(['one', 'tow', 'three'])
        var arr = Array.from(set)
        console.log(arr)
        //数组转换为set

        var arr = ['one', 'tow', 'three']
        var set = new Set(arr)
        console.log(set)


        console.log(WeakSet.prototype)

        //WeakSet是弱引用
        
    </script>
</body>

</html>